import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/login.vue'
import Home from '../views/Home.vue'
import Body from '../views/Body.vue'
import Community from '../views/Community.vue'
import Store from '../views/Store.vue'
import Post from '../views/Post.vue'
import Shop from '../views/Shop.vue'
import Recycle from '../views/Recycle.vue'
import Order from '../views/Order.vue'
import Shopmanage from '../views/Shopmanage.vue'
import panghujiazheng from '../views/panghujiazheng.vue'

Vue.use(VueRouter)


const routes = [
  {
    path: '/',
    redirect:'/login'
  },
  {
	  path:'/login',
	  component:Login
  },
  {
  	  path:'/home',
  	  component:Home,
	  children:[
		  {
			path: '/',
			redirect:'/body'  
		  },
		  {
			  path:'/body',
			  component:Body,
		  },
		  {
			  path:'/community',
			  component:Community
		  },
		  {
			  path:'/store',
			  component:Store
		  },
		  {
			  path:'/post',
			  component:Post
		  },
		  {
			  path:'/shop',
			  component:Shop
		  },
		  {
			  path:'/recycle',
			  component:Recycle
		  },
		  {
			  path:'/order',
			  component:Order
		  },
		  {
			  path:'/shopmanage',
			  component:Shopmanage
		  },
		  {
			  path:'/panghujiazheng',
			  component:panghujiazheng
		  }
	  ]
  }
 
]

const router = new VueRouter({
  routes
})

export default router
